package com.linln.modules.friends.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

import com.linln.modules.friends.domain.Message;
import com.linln.modules.system.repository.BaseRepository;

/**
 * @author 左书亮
 * @date 2019/10/22
 */
public interface MessageRepository extends BaseRepository<Message, Long> {

	@Transactional
	@Query(value="select * from or_message  where receiveuser=?1 or receiveuser=?1 ",nativeQuery=true)
	public Page<Message> getPageList(@Param("userid") long userid,Pageable pageable);

}